class ZitchGhost():
    def __init__(self):
        self.emf = 0
        self.intercom = 0
        self.notebook = 0
        self.lattice = 0
        self.fingerprint = 0
        self.ball = 0
        self.cold = 0
        self.ghostType = dict()
        self.ghostType["魂魄"] = [1, 1, 1, -1, -1, -1, -1]
        self.ghostType["死灵"] = [1, 1, -1, 1, -1, -1, -1]
        self.ghostType["幻影"] = [-1, 1, -1, 1, 1, -1, -1]
        self.ghostType["骚灵"] = [-1, 1, 1, -1, 1, -1, -1]
        self.ghostType["女妖"] = [-1, -1, -1, 1, 1, 1, -1]
        self.ghostType["巨灵"] = [1, -1, -1, -1, 1, -1, 1]
        self.ghostType["梦魇"] = [-1, 1, 1, -1, -1, 1, -1]
        self.ghostType["亡魂"] = [-1, -1, 1, -1, -1, 1, 1]
        self.ghostType["暗影"] = [1, -1, 1, -1, -1, -1, 1]
        self.ghostType["恶魔"] = [-1, -1, 1, -1, 1, -1, 1]
        self.ghostType["幽灵"] = [-1, -1, -1, 1, -1, 1, 1]
        self.ghostType["赤鬼"] = [1, -1, -1, 1, -1, -1, 1]
        self.ghostType["寒魔"] = [-1, -1, -1, -1, 1, 1, 1]
        self.ghostType["妖怪"] = [-1, 1, -1, 1, -1, 1, -1]
        self.ghostType["御灵"] = [1, -1, -1, 1, 1, -1, -1]
        self.ghostType["鬼婴"] = [1, -1, 1, -1, 1, -1, -1]

    def guessGhost(self):
        proofsNames = ["EMF5级", "通灵盒", "鬼魂笔记", "点阵投影仪", "指纹", "灵球", "刺骨寒温"]
        proofsValues = [expectedProofs for type, expectedProofs in vars(self).items() if type != "ghostType"]
        resultList = list(self.ghostType.keys())
        for index in range(len(proofsValues)):
            for type, expectedProofs in self.ghostType.items():
                if proofsValues[index] == 0:
                    pass
                else:
                    if proofsValues[index] != expectedProofs[index]:
                        if type in resultList:
                            resultList.remove(type)
                        else:
                            pass
        result = list()
        for i in range(len(resultList)):
            tempRes = dict()
            tempRes["result_num"] = i + 1
            tempRes["ghost_type"] = resultList[i]
            tempRes["other_proof"] = list()
            for proofIndex in range(len(self.ghostType[resultList[i]])):
                otherProof = proofsNames[proofIndex]
                if proofsValues[proofIndex] == 0 and self.ghostType[resultList[i]][proofIndex] == 1:
                    tempRes["other_proof"].append(otherProof)
                else:
                    pass
            result.append(tempRes)
        return result
